﻿using Microsoft.AspNetCore.Razor.TagHelpers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ReaWTM.LayuiHelper
{
	public static class TagHelperContextExtension
	{
		public static TagHelperContext SetItem(this TagHelperContext self, string key, object value)
		{
			if (self.Items.ContainsKey(key))
			{
				self.Items[key] = value;
			}
			else
			{
				self.Items.Add(key, value);
			}
			return self;
		}
	}
}
